home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14022 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: best way to make a program pause for a while
  5. Date: Wed, 10 Apr 96 20:19:53 GMT
  6. Organization: none
  7. Message-ID: <829167593snz@genesis.demon.co.uk>
  8. References: <4kevtq$knj@pirates.cs.swt.edu>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4kevtq$knj@pirates.cs.swt.edu>
  15.            mh22888@dali.math.swt.edu "Mohammed Hasan" writes:
  16.  
  17. >i need to make my simple c program(to run in unix env)
  18. >wait for a while before it terminates.
  19. >what would be the best way to accomplish this?
  20.  
  21. The C language doesn't provide a method of doing this short of busy-waiting
  22. on time(). Unix systems provide the sleep() call but for more information
  23. on that and alternatives see comp.unix.programmer.
  24.  
  25. -- 
  26. -----------------------------------------
  27. Lawrence Kirby | fred@genesis.demon.co.uk
  28. Wilts, England | 70734.126@compuserve.com
  29. -----------------------------------------
  30.